Skip to content

merge dev into master for v0.42.0 release #1442

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 58 commits into from
Jul 16, 2025
Merged

merge dev into master for v0.42.0 release #1442

merged 58 commits into from
Jul 16, 2025

Conversation

andrijapau
Copy link
Contributor

@andrijapau andrijapau commented Jul 16, 2025

Following the release guide,

Create a new branch from dev, and open a PR to merge the new branch into master. Once merged in, ensure that master subsequently builds successfully.

This merges all changes from dev that occured for the release of v0.42.0 PL ecosystem.

PR is a follow up to #1441 where we updated dependencies in dev. This PR was created with,

  • Make branch final-dev-v0420 after pulling latest dev
  • Create PR targeting master

actions-user and others added 30 commits April 28, 2025 19:56
bug fix for the iqp circuit optimization demo. We updated the external
package (IQPopt) and this caused an issue because we didn't specify a
kwarg in one of the functions. Should be back now.

---------

Co-authored-by: Rashid N H M <95639609+rashidnhm@users.noreply.github.com>
Co-authored-by: Paul Finlay <50180049+doctorperceptron@users.noreply.github.com>
Co-authored-by: doctorperceptron <paul@xanadu.ai>
**Context:**

Unfortunately, lots of errors were hiding for a long time. Most of them
are resolved by updating dependencies.

[sc-92403]

---------

Co-authored-by: dwierichs <david.wierichs@xanadu.ai>
Co-authored-by: JerryChen97 <chenys13@outlook.com>
andrijapau and others added 7 commits July 10, 2025 14:18
**Context:**

This demo only works with `pennylane<=0.40.0` and a specific tensorflow
version.

**Change:**

Mention this in the warning.

<img width="866" height="380" alt="image"
src="https://github.com/user-attachments/assets/007b5661-6a1b-4b3c-a54e-1abf4957c802"
/>
**Title:**

**Summary:**
- The odegen demo is very sensitive to the initial guess. Updating the
random seed so that the plot looks nicer.
- The classical shadows demo is not compatible with latest jax, and is
using an old interface of sklearn

**Relevant references:**

**Possible Drawbacks:**

**Related GitHub Issues:**
**Title:**
Adjust output format in `how_to_user_qiskit1_with_pennylane`

**Summary:**
Corrected two altered output since last modification.

**Relevant references:**

**Possible Drawbacks:**

**Related GitHub Issues:**
**Title:**
Fix result for the Demo `how_to_catalyst_lightning_gpu.py`

**Summary:**
Since JAX v0.5.0, the PRNGKey behaviour has been updated, so using the
same PRNGKey with different versions of JAX will impact what outputs
jax.random gives.

**Relevant references:**

**Possible Drawbacks:**

**Related GitHub Issues:**
[sc-95314]

----
If you are writing a demonstration, please answer these questions to
facilitate the marketing process.

* GOALS — Why are we working on this now?

*Eg. Promote a new PL feature or show a PL implementation of a recent
paper.*


* AUDIENCE — Who is this for?

*Eg. Chemistry researchers, PL educators, beginners in quantum
computing.*


* KEYWORDS — What words should be included in the marketing post?


* Which of the following types of documentation is most similar to your
file?
(more details
[here](https://www.notion.so/xanaduai/Different-kinds-of-documentation-69200645fe59442991c71f9e7d8a77f8))
    
- [ ] Tutorial
- [X] Demo
- [ ] How-to
* Update `ahs_aquila` demo to render `qml.QuantumFunctionError`
deprecation warning
* Update `qnspsa` demo to stop unravelling parameters to cost function
* Update adjoint differentiation demos (`adjoint_diff_benchmarking` and
`tutorial_adjoint_diff`) to use autograd instead of JAX
  * Use log scaling for y-axis of second plot
* Update `getting_started_with_hybrid_jobs` demo to render deprecation
warning, and use a while loop to block until job metrics are available
* Update `quantum_volume` demo with new coupling map and instructions
for setting up API key
**Context:**

This demo was getting random warnings,
```
/home/runner/work/qml/qml/venv/lib/python3.10/site-packages/cotengra/hyperoptimizers/hyper.py:57: UserWarning: Couldn't find `optuna`, `cmaes`, or `nevergrad` so will use completely random sampling in place of hyper-optimization.
  warnings.warn(
/home/runner/work/qml/qml/venv/lib/python3.10/site-packages/cotengra/hyperoptimizers/hyper.py:76: UserWarning: Couldn't find `optuna`, `cmaes`, or `nevergrad` so will use completely random sampling in place of hyper-optimization.
  warnings.warn(
```
which seemed to only occur with `cotengra <= 0.7.4`.


![image](https://github.com/user-attachments/assets/2ed9409a-1e9b-4662-a1da-296bd8ce303a)



**Description of the change:**

By upgrading `cotengra` (and `quimb` ... why not?), the warnings
disappear.

**Benefits:**

No more warnings,


![image](https://github.com/user-attachments/assets/317699c6-d0f5-48ce-96ee-71041f87f1ce)
With the latest ecosystem released to PyPI, it's time to update `dev` to
use these dependencies. This PR also reverts the change to install
pennylane from master instead of the `v0.42.0-rc0` branch.

This PR was prepared by first updating PL ecosystem to the latest
release, then `poetry lock`. Then the remaining changes came from making
the dependency tree happy.

⚠️ Important change: `qrisp` and `neural-tangents` were taken out of the
`pyproject.toml` dependencies as they create some weird `tensorflow`
error,
```
% poetry lock
Updating dependencies
Resolving dependencies... (6.3s)

Package 'tensorflow-macos' is listed as a dependency of itself.
```

This is fine because the only demos that depend on them are
non-executable.
Copy link

👋 Hey, looks like you've updated some demos!

🐘 Don't forget to update the dateOfLastModification in the associated metadata files so your changes are reflected in Glass Onion (search and recommendations).

Please hide this comment once the field(s) are updated. Thanks!

@andrijapau andrijapau requested a review from a team July 16, 2025 00:22
@andrijapau andrijapau changed the title merge dev into master merge dev into master for v0.42.0 release Jul 16, 2025
Copy link

github-actions bot commented Jul 16, 2025

Thank you for opening this pull request.

You can find the built site at this link.

Deployment Info:

  • Pull Request ID: 1442
  • Deployment SHA: 991bf2b1302e31688209677f32fd502de749a94c
    (The Deployment SHA refers to the latest commit hash the docs were built from)

Note: It may take several minutes for updates to this pull request to be reflected on the deployed site.

**Title:**
Fix v2 builds

**Summary:**
This PR syncs changes from `demonstrations` with `demonstrations_v2` and
adds `pennylane_qisket` as a individual dependency in
`tutorial_error_mitigation`
Copy link
Collaborator

@Alan-eMartin Alan-eMartin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻 thank @andrijapau - appologies for v2

@andrijapau
Copy link
Contributor Author

@ashishks0522 @doctorperceptron any chance for a second review? 🙏🏼

@andrijapau andrijapau merged commit c5f40d4 into master Jul 16, 2025
28 of 30 checks passed
@andrijapau andrijapau deleted the final-dev-v0420 branch July 16, 2025 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:build-all-qml-demos Build all the Demos for this Pull Request
Projects
None yet
Development

Successfully merging this pull request may close these issues.